-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: Bug in csv parsing when passing dtype and names and the parsed data is a different data type (GH8833) #8834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
expected = DataFrame([[1,1],[2,2],[3,3]],columns=['a','b']) | ||
tm.assert_frame_equal(result, expected) | ||
|
||
data = """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i think if you request an int
when there's clearly a nan
in the column then it should raise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the other alternative is to ignore the user, but that doesn't seem very polite
552ed84
to
fc54c8a
Compare
@cpcloud |
Course numpy is annoying (this is 1.9.1). You would think that the casting a == float to an int is safe :)
cc @mwiebe |
The tricky thing here is that NumPy only has the types to make this determination, not the values, so from the perspective of only knowing that it is float -> int, it is not a safe cast. The error mode in dynd is an attempt to provide a value-based way to handle this, by inserting code to check the values as float is converted to int. |
@mwiebe and that is exactly what I do will be trying out dynd for real with ?int64 after pydata |
…ata is a different data type (GH8833)
BUG: Bug in csv parsing when passing dtype and names and the parsed data is a different data type (GH8833)
closes #8833